import request from '@/utils/request'

const wechat_api = '/platform/work_wechat/index/'

// 获取创建表单
export function getWorkWechatCreateForm() {
  return request({
    url: wechat_api + 'create',
    method: 'GET'
  })
}

// 获取编辑表单
export function getWorkWechatEditForm(id) {
  return request({
    url: wechat_api + id + '/edit',
    method: 'GET'
  })
}
// 获取企业微信服务商授权链接
export function getOpenOauthUrl(id) {
  return request({
    url: wechat_api + 'getOpenOauthUrl',
    method: 'POST',
    data: { id }
  })
}
// 被服务商授权后查询企业信息
export function getAuthorization(id) {
  return request({
    url: wechat_api + 'getAuthorization',
    method: 'POST',
    data: { id }
  })
}
